package com.xingxuecn.limit.service.impl;

import com.xingxuecn.limit.common.model.Role;
import com.xingxuecn.limit.common.model.Page;
import com.xingxuecn.limit.common.model.TreeNode;
import com.xingxuecn.limit.dao.RoleDao;
import com.xingxuecn.limit.dao.impl.RoleDaoImpl;
import com.xingxuecn.limit.service.RoleService;
import java.sql.SQLException;
import java.util.LinkedList;
import java.util.List;


/**
 * @author 你的名字 at 2018/9/10 15:04
 */

public class RoleServiceImpl implements RoleService {
    private RoleDao roleDao = new RoleDaoImpl();
   @Override
    public List<Role> findAll() throws SQLException {
        return roleDao.findAll();
    }

    @Override
    public List<Role> search(Role role) throws SQLException {
        return roleDao.search(role);
    }

    @Override
    public int add(Role role) throws SQLException {
        return roleDao.add(role);
    }

    @Override
    public int update(Role role) throws SQLException {
        return roleDao.update(role);
    }

    @Override
    public int delete(Integer id) throws SQLException {
        return roleDao.delete(id);
    }



    @Override
    public Page searchPage(Role role, Integer page, Integer rows) throws SQLException {
        return roleDao.searchPage(role, page, rows);
    }
}
